package win.zxshuo.www.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.stereotype.Service;
import win.zxshuo.www.model.BookModel;
import win.zxshuo.www.model.UserModel;
import win.zxshuo.www.repository.BookShelfRepository;

import java.util.List;

/**
 * Author:rffanlab
 * Created:2018/4/9
 */
@Service
@Configurable
public class BookshelfService {
    @Autowired
    BookShelfRepository bookShelfRepository;

    public List<BookModel> getAllBooksInShellf(UserModel userModel){
        return bookShelfRepository.getBooksByUserId(userModel.getId());
    }




}
